@extends('manage.layout')

@section('content')
    <section class="content-header">
        <h1>
            CRM数据字典
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">Date</a></li>
            <li class="active">Data dictionary</li>
        </ol>
    </section>
    <section class="content">
        @foreach($date as $k=>$v)
            <div class="row" style="width: 100%;">
            <div class="col-xs-12">
                <div class="box" style="border-top:3px solid #43B862">
                    <div class="box-header">
                        <h3 class="box-title">{{$v['TABLE_NAME']}}({{$v['TABLE_COMMENT']}})</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <tbody><tr>
                                <th>字段</th>
                                <th>数据类型</th>
                                <th>默认</th>
                                <th>允许非空</th>
                                <th>自动递增</th>
                                <th>注释</th>
                            </tr>
                            @foreach($v['COLUMN'] AS $f)
                                <tr>
                                    <td>{{$f['COLUMN_NAME']}}</td>
                                    <td>{{$f['COLUMN_TYPE']}}</td>
                                    <td>{{$f['COLUMN_DEFAULT']}}</td>
                                    <td>{{$f['IS_NULLABLE']}}</td>
                                    <td>({{$f['EXTRA']=='auto_increment'?'是':'否'}})</td>
                                    <td>{{$f['COLUMN_COMMENT']}}</td>
                                </tr>
                            @endforeach

                            </tbody></table>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
        </div>
        @endforeach
    </section>
@stop